using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;

using WhittleList.Helpers;

namespace WhittleList.Controllers
{
    [Authorize]
    public class DashboardController : BaseController
    {
        //
        // GET: /Dashboard/

        public ActionResult Main()
        {
            if (CurrentUser == null)
            {
                return Redirect(Url.Home());
            }
            else
            {
                var data = new Models.MainDashboard() { User = CurrentUser};
                data.Site = SiteRepository.Site_GetAllByOwnerId(CurrentUser.Id).FirstOrDefault();

                return View(data);
            }
        }

    }
}
